package greate.project.strategy.strategy0;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;
@Slf4j
@Service
public class MobileMessageService {


    @Value("${mobile-message.model}")
    private String serviceName;

    @Resource
    private Map<String, SendMobileMessage> sendMobileMessage;

    public void sendMessage(String mobile , String msg){
        log.info("发送短信 。。。");
        sendMobileMessage.get(serviceName).sendMessage(mobile , msg);
    }

}
